package com.llf.Service;

import com.llf.Mapper.UserMapper;
import com.llf.Pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class UserServiceImpl  implements UserService{
    @Autowired
    private UserMapper userMapper;


    @Override
    public ArrayList<User> getUser(String userName,Integer userRole) { return userMapper.getUser(userName, userRole); }
    @Override
    public User getLoginUser(String userCode) {
        return userMapper.getLoginUser(userCode);
    }

    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }



    @Override
    public int deleteUserById(Integer id) {
        return userMapper.deleteUserById(id);
    }

    @Override
    public User getUserById(Integer id) {
        return userMapper.getUserById(id);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }

    @Override
    public int updatePwd(User user) {
        return userMapper.updatePwd(user);
    }

    @Override
    public User quaryByuserName(String userName) {
        return userMapper.quaryByuserName(userName);
    }



}
